#pragma once
#include <iostream>
#include <string>

using namespace std;

class PersonLinkedList
{
	friend struct Person;
public:
	PersonLinkedList(void);
	~PersonLinkedList(void);

	void insert(string name, int age);
    void display();
    void deleteMostRecent();
    int getAge(string personName);

private:
	Person *head;
};

struct Person{
	string name;
	int age;
	Person *next;
};